+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
+Mon Jul 31 18:37:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
+ was depending on widget->allocation instead of the width of text_area,
+ which was incorrect for subclasses like GtkSpinButton.
+
+ * gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
+ with width == 1 tests that should be width == -1.
+
Mon Jul 31 16:45:48 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
pango_layout_line_get_extents (line, NULL, &logical_rect);
- if (width != 1 && align == PANGO_ALIGN_RIGHT)
+ if (width != -1 && align == PANGO_ALIGN_RIGHT)
x_offset = width - logical_rect.width;
- else if (width != 1 && align == PANGO_ALIGN_CENTER)
+ else if (width != -1 && align == PANGO_ALIGN_CENTER)
x_offset = (width - logical_rect.width) / 2;
else
x_offset = 0;
gtk_editable_claim_selection (editable, TRUE, GDK_CURRENT_TIME);
gtk_im_context_set_client_window (entry->im_context, entry->text_area);
+
+ entry_adjust_scroll (entry);
}
static void
allocation->width - widget->style->xthickness * 2,
requisition.height - widget->style->ythickness * 2);
+ /* And make sure the cursor is on screen */
+ entry_adjust_scroll (entry);
}
-
- /* And make sure the cursor is on screen */
- entry_adjust_scroll (entry);
}
static void
g_return_if_fail (GTK_IS_ENTRY (entry));
widget = GTK_WIDGET (entry);
- text_area_width = widget->allocation.width - 2 * (widget->style->xthickness + INNER_BORDER);
- if (!entry->layout)
+ if (!entry->layout || !GTK_WIDGET_REALIZED (entry))
return;
+ gdk_window_get_size (entry->text_area, &text_area_width, NULL);
+ text_area_width -= 2 * INNER_BORDER;
+
line = pango_layout_get_lines (entry->layout)->data;
/* Display as much text as we can */